package com.fuze.questionnaire.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author sepc_
 * @date 10/20/2021 15:08
 * 用户-选项关联表实体
 */
@ApiModel(value="user_result_tab")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_result_tab")
public class UserResult implements Serializable {
    private static final long serialVersionUID = -259807761476339787L;
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="主键id")
    private Integer id;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value="用户id")
    private Integer userId;

    /**
     * 问题id
     */
    @TableField(value = "problem_id")
    @ApiModelProperty(value="问题id")
    private Integer problemId;

    /**
     * 选项结果
     */
    @TableField(value = "options_result")
    @ApiModelProperty(value="选项结果")
    private String optionsResult;

    public static final String COL_ID = "id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_PROBLEM_ID = "problem_id";

    public static final String COL_OPTIONS_RESULT = "options_result";

    public UserResult(Integer userId, Integer problemId, String v) {
        this.userId = userId;
        this.problemId = problemId;
        this.optionsResult = v;
    }
}